Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://q.thinkphp.cn/post/972
通过在配置文件指定允许的公共域名后缀来避免。
config/app.php
目前大多数为了精准匹配,都是使用了 https://github.com/publicsuffix/list/blob/master/public_suffix_list.dat 文件,其中涉及 ICANN 的有一万行数据,如果我们每一个请求都要读取检索那么多信息,对业务的性能也会存在影响,另外该文件也需要定期更新。最终我采用由开发者自行配置来避免。